#include <iostream>

//通过class关键字定义类
class Student
{
public:
    const char * name;
    int age;
    //类包含的函数
    void printS()
    {
        //printf("%s的年龄是%d\n", name, age);
        std::cout << name << "的年龄是" << age << std::endl;
    }
};

int main()
{
    Student stu;
    stu.name = "zhangsan";
    stu.age = 15;
    stu.printS();
    return 0;
}